<?php
class Model_Grocerylist extends Model { 
	
	public function select_grocery_list($id)
	{
		$body = 'command=getGroceryList&id='.$id;
		return Helper_Curl::build_request($body);
	}
	
	public function change_product_amount($grocerylistid, $productid, $amount)
	{ 
		$body = 'command=changeAmountProduct&id='.$grocerylistid.'&productid='.$productid.'&amount='.$amount;
		var_dump($body);
		return Helper_Curl::build_request($body);
	}
	
	public function delete_from_list($grocerylistid, $productid) 
	{
		$body = 'command=deleteFromList&id='.$grocerylistid.'&productid='.$productid;
		return Helper_Curl::build_request($body);
	}
	
	public function add_to_list($grocerylistid, $productid, $amount) 
	{
		$body = 'command=addToList&id='.$grocerylistid.'&productid='.$productid.'&amount='.$amount;
		return Helper_Curl::build_request($body);
	}
}